package com.example.mysdktest.activities;

import android.view.View;
import android.widget.Button;

import com.example.mysdktest.R;
import com.example.mysdktest.base.BaseActivity;
import com.xm9m.ibczy.dsp.utils.AntLog;
import com.xm9m.ibczy.dsp.utils.NetWorkUtils;

/**
 * Created by baichuan on 2016/11/17.
 */

public class Test01 extends BaseActivity implements View.OnClickListener {
    private Button obtIp;

    @Override
    public int getLaout() {
        return R.layout.ac_test01;
    }

    @Override
    public void initView() {
        obtIp = (Button) findViewById(R.id.ac_test01_obt01);
    }

    @Override
    public void initData() {

    }

    @Override
    public void initListener() {
        obtIp.setOnClickListener(this);
    }

    @Override
    public void onClick(View view) {

        switch (view.getId()) {
            case R.id.ac_test01_obt01:
                getIp();
                break;
        }
    }

    public void getIp() {
        AntLog.i("ipadd=" + NetWorkUtils.getIpString(NetWorkUtils.getIp(this)));
        AntLog.i("mac=" + NetWorkUtils.getMac(this));

    }


}
